package com.htu.controller;

import com.htu.po.OrderDetailet;
import com.htu.service.OrderDetailetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/OrderDetailetController")
public class OrderDetailetController {
    @Autowired
    private OrderDetailetService orderDetailetService;

    @RequestMapping("/listOrderDetailetByOrderId")
    public Object listOrderDetailetByOrderId(String orderId){
        Integer orderId1 = Integer.valueOf(orderId);
        List<OrderDetailet> orderDetailetList = orderDetailetService.listOrderDetailetByOrderId(orderId1);
        return orderDetailetList;
    }
}
